<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Step 4: Configuring Log Backup.">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="SAP_HANA_0012.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
<meta name="DC.Publisher" content="20241029">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="SAP_HANA_0016">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Step 4: Configuring Log Backup.</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="SAP_HANA_0016"></a><a name="SAP_HANA_0016"></a>

<h1 class="topictitle1">Step 4: Configuring Log Backup.</h1>
<div><p>If log backup is configured in <a href="en-us_topic_0000002058629252.html">Step 5: Creating a Backup SLA</a>, enable log backup for the SAP HANA database by following the instructions provided in this section for log backup to take effect. Skip this section in other scenarios.</p>
<div class="section"><h4 class="sectiontitle">Context</h4><p>The SAP HANA database log backup function provided by the <span>OceanProtect</span> depends on the log backup capability of SAP HANA. After SAP HANA logs are backed up, they are backed up to the backup storage by the <span>OceanProtect</span>.</p>
</div>
<div class="section"><h4 class="sectiontitle">Procedure</h4><ol><li><span>Log in to the system database.</span><p><ol type="a"><li>Use PuTTY to log in to the SAP HANA database host.</li><li>Run the following command to switch to the system user:<pre class="screen">su - <em>systemi</em><em>d</em>adm</pre>
<p>Example:</p>
<pre class="screen">su - k00adm</pre>
</li><li>Run the following command to log in to the system database:<pre class="screen">hdbsql -i <em>Instance ID</em> -n <em>Host name of the master node of the system database</em>:<em>SQL Port of the system database</em> -d SYSTEMDB -u <em>Username of the system database</em> -p <em>Password of the system database</em></pre>
<p>Example:</p>
<pre class="screen">hdbsql -i 00 -n localhost:30013 -d SYSTEMDB -u SYSTEM -p xxxxxxx</pre>
</li></ol>
</p></li></ol><ol start="2"><li><span>Enable and configure the log backup function.</span><p><ol type="a"><li>Run the following command to enable SAP HANA database log backup:<pre class="screen">alter system alter configuration ('global.ini', 'SYSTEM') set ('persistence', 'enable_auto_log_backup') = 'yes' with reconfigure;</pre>
</li><li>Run the following command to set the directory for storing log backup copies.<div class="p">Ensure that the available space in the log backup path is greater than the space to be occupied by all log backup copies, and ensure that the SAP HANA log backup path permission is at least 755.<pre class="screen">alter system alter configuration ('global.ini', 'SYSTEM') set ('persistence', 'basepath_logbackup') = '<em>Directory for storing log backup copies</em>'  with reconfigure;</pre>
</div>
</li><li>Run the following command to set the log backup frequency, that is, the interval for backing up logs:<pre class="screen">alter system alter configuration ('global.ini', 'SYSTEM') set ('persistence', 'log_backup_timeout_s') = '<em>Log backup interval</em><em>(s)</em>' with reconfigure;</pre>
<p>It is recommended that the interval be set to 50% to 100% of the log backup interval set in <a href="en-us_topic_0000002058629252.html#EN-US_TOPIC_0000002058629252__en-us_topic_0000002058628320_en-us_topic_0000002004293194_en-us_topic_0000002004090332_en-us_topic_0000001839268545_table2663151516335">Table 1</a>. For example, if the log backup interval set in the backup policy is 60 minutes, you are advised to set the interval to a value ranging from 30 minutes to 60 minutes.</p>
</li></ol>
</p></li></ol>
</div>
<p></p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="SAP_HANA_0012.html">Backing Up the SAP HANA Database (General Databases Path)</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>